#ifndef ROUTE_TRAIN_DIALOG_H
#define ROUTE_TRAIN_DIALOG_H

#include <QDialog>
#include "RouteTrainDisplayInfo.h"
#include "positionmanager.h"
#include "route_trainer_manager.h"
#include <QLabel>
#include <QPushButton>
#include <QScrollArea>
#include <QVBoxLayout>

namespace Ui {
    class RouteTrainDialog;
}

class RouteTrainDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RouteTrainDialog(PositionManager* positionManager = nullptr, QWidget *parent = nullptr);
    ~RouteTrainDialog();
    void closeEvent(QCloseEvent *event);

    static RouteTrainDialog* instance;

    void displayRouteTrainResult(QList<RouteTrainDisplayInfo*> * list, bool isEnd);

private slots:
    void on_btn_start_clicked();
    void on_btn_end_clicked();

private:
    Ui::RouteTrainDialog *ui;
    PositionManager* positionManager;
    RouteTrainerManager routeTrainerManager;
};

#endif // ROUTE_TRAIN_DIALOG_H
